package com.atguigu.practice;

import java.util.Scanner;

public class TheMaxSeries {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        String s=scanner.next();
        int max=0;
        for(int i=0;i<s.length();i++){
            int count=0;
            char ch=s.charAt(i);
            while(Character.isDigit(ch)&&i<s.length()){
                count++;
                i++;
                if(i!=s.length()) {
                    ch = s.charAt(i);
                }
            }
            if(count>max){
                max=count;
            }
        }
        //可以得到max的值
        for(int i=0;i<s.length();i++){
            StringBuilder sb=new StringBuilder();
            int count=0;
            char ch=s.charAt(i);
            while(Character.isDigit(ch)&&i<s.length()){
                sb.append(ch);
                count++;
                i++;
                if(i!=s.length()) {
                    ch = s.charAt(i);
                }
            }
            if(sb.length()==max){
                System.out.println(sb.toString());
            }
        }
    }
}
